package book;

public class BookList {
    private Book[] books = new Book[10];
    private int usedSize;

    public BookList(){
        books[0] = new Book("操作系统原理","阿罗哈",67,"教材");
        books[1] = new Book("网络技术","阿罗呀",17,"教材");
        books[2] = new Book("Linux嵌入式","阿罗哇",57,"教材");
        this.usedSize = 3;
    }

    public Book getBook(int pos) {
        return books[pos];
    }

    public void setBook(int pos,Book book) {
        books[pos] = book;
    }

    public int getUsedSize() {
        return usedSize;
    }

    public void setUsedSize(int usedSize) {
        this.usedSize = usedSize;
    }

    public boolean isFull(){
        if(this.usedSize == books.length){
            return true;
        }
        return false;
    }
}
